<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: dlgend.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00098.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">dlgend.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a03620_source.html">precomp.h</a>&quot;</code><br />
</div>
<p><a href="a00098_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:aa5a68d879547f0460331c71bee94763a"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00098.html#aa5a68d879547f0460331c71bee94763a">EndDialog</a> (HWND hwnd, int result)</td></tr>
<tr class="separator:aa5a68d879547f0460331c71bee94763a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="aa5a68d879547f0460331c71bee94763a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5a68d879547f0460331c71bee94763a">&#9670;&nbsp;</a></span>EndDialog()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL EndDialog </td>
          <td>(</td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00098_source.html">dlgend.c</a> 第 <a class="el" href="a00098_source.html#l00022">22</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;{</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwnd;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndOwner;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    HWND hwndOwner;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    BOOL fWasActive = FALSE;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#ifdef SYSMODALWINDOWS</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    HWND hwndOldSysModal;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordflow">if</span> ((pwnd = <a class="code" href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a>(hwnd)) == NULL) {</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordflow">return</span> (0L);</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    }</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160; </div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(pwnd);</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160; </div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">     * Must do special validation here to make sure pwnd is a dialog window.</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="a00101.html#af38990a3dec781c0280a7a447a5fe734">ValidateDialogPwnd</a>(pwnd))</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordflow">if</span> (SAMEWOWHANDLE(hwnd, <a class="code" href="a00263.html#ac8f5c02b4100c14a5e421bdd07ecdd10">GetActiveWindow</a>())) {</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        fWasActive = TRUE;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    }</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="comment">     * GetWindowCreator returns either a kernel address or NULL.</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    pwndOwner = GetWindowCreator(pwnd);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordflow">if</span> (pwndOwner != NULL) {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment">         * Hide the window.</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        pwndOwner = REBASEPTR(pwnd, pwndOwner);</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        hwndOwner = HWq(pwndOwner);</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="a00365.html#aaad45088258144a066fcea47a43bb325">PDLG</a>(pwnd)-&gt;fDisabled) {</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;            NtUserEnableWindow(hwndOwner, TRUE);</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        }</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        hwndOwner = NULL;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    }</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160; </div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment">     * Terminate Mode Loop.</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <a class="code" href="a00365.html#aaad45088258144a066fcea47a43bb325">PDLG</a>(pwnd)-&gt;<a class="code" href="a02641.html#a9caeec5df61c00e30c911adee32d88ad">fEnd</a> = TRUE;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <a class="code" href="a00365.html#aaad45088258144a066fcea47a43bb325">PDLG</a>(pwnd)-&gt;<a class="code" href="a02641.html#a8b2e13c78efca330f06b6ddcd7464b41">result</a> = result;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    <span class="keywordflow">if</span> (fWasActive &amp;&amp; <a class="code" href="a03743.html#a8cf1d97d79126c678e058be653fa9296">IsChild</a>(hwnd, <a class="code" href="a00263.html#a28521e14af0467416fa705ce219277cd">GetFocus</a>())) {</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="comment">         * Set focus to the dialog box so that any control which has the focus</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="comment">         * can do an kill focus processing.  Most useful for combo boxes so that</span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">         * they can popup their dropdowns before destroying/hiding the dialog</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">         * box window.  Note that we only do this if the focus is currently at a</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">         * child of this dialog box.  We also need to make sure we are the active</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment">         * window because this may be happening while we are in a funny state.</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment">         * ie.  the activation is in the middle of changing but the focus hasn&#39;t</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">         * changed yet.  This happens with TaskMan (or maybe with other apps that</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment">         * change the focus/activation at funny times).</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        <a class="code" href="a00362.html#a3aa84979aeb1f89caa4217dc0f88b104">NtUserSetFocus</a>(hwnd);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    }</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <a class="code" href="a00362.html#a97ea52174705d791899a9df860aab676">NtUserSetWindowPos</a>(hwnd, NULL, 0, 0, 0, 0,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                       SWP_HIDEWINDOW | SWP_NOACTIVATE | SWP_NOMOVE |</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                       SWP_NOSIZE | SWP_NOZORDER);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="preprocessor">#ifdef SYSMODALWINDOWS</span></div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160; </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="comment">     * If this guy was sysmodal, set the sysmodal flag to previous guy so we</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;<span class="comment">     * won&#39;t have a hidden sysmodal window that will screw things</span></div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">     * up royally...</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">if</span> (pwnd == gspwndSysModal) {</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        hwndOldSysModal = <a class="code" href="a00365.html#aaad45088258144a066fcea47a43bb325">PDLG</a>(pwnd)-&gt;<a class="code" href="a02641.html#a5bbf67c98e23e4425ab70eee18ab4a0d">hwndSysModalSave</a>;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <span class="keywordflow">if</span> (hwndOldSysModal &amp;&amp; !<a class="code" href="a03743.html#ac5ede70e870dc1cf540d7524887e4edc">IsWindow</a>(hwndOldSysModal))</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;            hwndOldSysModal = NULL;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        SetSysModalWindow(hwndOldSysModal);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        <span class="comment">// If there was a previous system modal window, we want to</span></div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="comment">// activate it instead of this window&#39;s owner.</span></div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="comment">//</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">if</span> (hwndOldSysModal)</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;            hwndOwner = hwndOldSysModal;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    }</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="comment">     * Don&#39;t do any activation unless we were previously active.</span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordflow">if</span> (fWasActive &amp;&amp; hwndOwner) {</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <a class="code" href="a00362.html#a98d8ab6298c0d956ef15fe0279a04b52">NtUserSetActiveWindow</a>(hwndOwner);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160; </div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="comment">         * If at this point we are still the active window it means that</span></div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="comment">         * we have fallen into the black hole of being the only visible</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;<span class="comment">         * window in the system when we hid ourselves.  This is a bug and</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="comment">         * needs to be fixed better later on.  For now, though, just</span></div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;<span class="comment">         * set the active and focus window to NULL.</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordflow">if</span> (SAMEWOWHANDLE(hwnd, <a class="code" href="a00263.html#ac8f5c02b4100c14a5e421bdd07ecdd10">GetActiveWindow</a>())) {</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="comment">//     The next two lines are *not* the equivalent of the two Unlock</span></div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="comment">//      statements that were in Daytona server-side dlgend.c.  So, we</span></div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="comment">//      need to go over to server/kernel and do it right.  This fixes</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="comment">//      a problem in Visual Slick, which had the MDI window lose focus</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="comment">//      when a message box was dismissed.  FritzS</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="comment">//            SetActiveWindow(NULL);</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="comment">//            SetFocus(NULL);</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;            <a class="code" href="a00362.html#ab64eb963b74811908a5b9bc99d77b8ac">NtUserCallNoParam</a>(<a class="code" href="a00335.html#ae4f4bae9800c2d6e50771827f515273e">SFI_ZAPACTIVEANDFOCUS</a>);</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    }</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;<span class="preprocessor">#ifdef SYSMODALWINDOWS</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;<span class="comment">     * If this guy was sysmodal, set the sysmodal flag to previous guy so we</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment">     * won&#39;t have a hidden sysmodal window that will screw things</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="comment">     * up royally...</span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="comment">     * See comments for Bug #134; SANKAR -- 08-25-89 --;</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordflow">if</span> (pwnd == gspwndSysModal) {</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160; </div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;<span class="comment">         * Check if the previous Sysmodal guy is still valid?</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        hwndOldSysModal = <a class="code" href="a00365.html#aaad45088258144a066fcea47a43bb325">PDLG</a>(pwnd)-&gt;<a class="code" href="a02641.html#a5bbf67c98e23e4425ab70eee18ab4a0d">hwndSysModalSave</a>;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;        <span class="keywordflow">if</span> (hwndOldSysModal &amp;&amp; !<a class="code" href="a03743.html#ac5ede70e870dc1cf540d7524887e4edc">IsWindow</a>(hwndOldSysModal))</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;            hwndOldSysModal = NULL;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        SetSysModalWindow(hwndOldSysModal);</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="comment">     * Make sure the dialog loop will wake and destroy the window.</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="comment">     * The dialog loop is waiting on posted events (WaitMessage). If</span></div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="comment">     * EndDialog is called due to a sent message from another thread the</span></div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="comment">     * dialog loop will keep waiting for posted events and not destroy</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="comment">     * the window. This happens when the dialog is obscured.</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="comment">     * This is a problem with winfile and its copy/move dialog.</span></div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <a class="code" href="a00356.html#a3f53b9d5a549a62853c4e3fb22b649d7">PostMessage</a>(hwnd, WM_NULL, 0, 0);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock()</a>, <a class="el" href="a00365_source.html#l02152">_DLG::fEnd</a>, <a class="el" href="a00263_source.html#l00412">GetActiveWindow()</a>, <a class="el" href="a00263_source.html#l00090">GetFocus()</a>, <a class="el" href="a00365_source.html#l02157">_DLG::hwndSysModalSave</a>, <a class="el" href="a03743_source.html#l00622">IsChild()</a>, <a class="el" href="a03743_source.html#l00421">IsWindow()</a>, <a class="el" href="a03614_source.html#l03204">NtUserCallNoParam()</a>, <a class="el" href="a03614_source.html#l04493">NtUserSetActiveWindow()</a>, <a class="el" href="a03614_source.html#l04594">NtUserSetFocus()</a>, <a class="el" href="a03614_source.html#l01716">NtUserSetWindowPos()</a>, <a class="el" href="a00356_source.html#l00471">PostMessage()</a>, <a class="el" href="a00365_source.html#l02154">_DLG::result</a>, <a class="el" href="a00335_source.html#l00069">SFI_ZAPACTIVEANDFOCUS</a>, <a class="el" href="a00101_source.html#l00180">ValidateDialogPwnd()</a> , 以及 <a class="el" href="a00293_source.html#l00090">ValidateHwnd</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00959_source.html#l00305">AboutDlgProc()</a>, <a class="el" href="a03239_source.html#l00916">EndTaskDlgProc()</a>, <a class="el" href="a00212_source.html#l01177">MB_DlgProcWorker()</a>, <a class="el" href="a00197_source.html#l00725">MDIActivateDlgProcWorker()</a> , 以及 <a class="el" href="a00959_source.html#l00345">ResultsDlgProc()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa00263_html_a28521e14af0467416fa705ce219277cd"><div class="ttname"><a href="a00263.html#a28521e14af0467416fa705ce219277cd">GetFocus</a></div><div class="ttdeci">HWND GetFocus(VOID)</div><div class="ttdef"><b>Definition:</b> <a href="a00263_source.html#l00090">winmgrc.c:90</a></div></div>
<div class="ttc" id="aa02641_html_a5bbf67c98e23e4425ab70eee18ab4a0d"><div class="ttname"><a href="a02641.html#a5bbf67c98e23e4425ab70eee18ab4a0d">_DLG::hwndSysModalSave</a></div><div class="ttdeci">HWND hwndSysModalSave</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02157">user.h:2157</a></div></div>
<div class="ttc" id="aa02641_html_a9caeec5df61c00e30c911adee32d88ad"><div class="ttname"><a href="a02641.html#a9caeec5df61c00e30c911adee32d88ad">_DLG::fEnd</a></div><div class="ttdeci">UINT fEnd</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02152">user.h:2152</a></div></div>
<div class="ttc" id="aa00101_html_af38990a3dec781c0280a7a447a5fe734"><div class="ttname"><a href="a00101.html#af38990a3dec781c0280a7a447a5fe734">ValidateDialogPwnd</a></div><div class="ttdeci">BOOL ValidateDialogPwnd(PWND pwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a00101_source.html#l00180">dlgmgr.c:180</a></div></div>
<div class="ttc" id="aa03743_html_ac5ede70e870dc1cf540d7524887e4edc"><div class="ttname"><a href="a03743.html#ac5ede70e870dc1cf540d7524887e4edc">IsWindow</a></div><div class="ttdeci">BOOL IsWindow(HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00421">client/wow.c:421</a></div></div>
<div class="ttc" id="aa00263_html_ac8f5c02b4100c14a5e421bdd07ecdd10"><div class="ttname"><a href="a00263.html#ac8f5c02b4100c14a5e421bdd07ecdd10">GetActiveWindow</a></div><div class="ttdeci">HWND GetActiveWindow(VOID)</div><div class="ttdef"><b>Definition:</b> <a href="a00263_source.html#l00412">winmgrc.c:412</a></div></div>
<div class="ttc" id="aa00365_html_aaad45088258144a066fcea47a43bb325"><div class="ttname"><a href="a00365.html#aaad45088258144a066fcea47a43bb325">PDLG</a></div><div class="ttdeci">struct _DLG * PDLG</div></div>
<div class="ttc" id="aa00356_html_a3f53b9d5a549a62853c4e3fb22b649d7"><div class="ttname"><a href="a00356.html#a3f53b9d5a549a62853c4e3fb22b649d7">PostMessage</a></div><div class="ttdeci">BOOL APIENTRY PostMessage(HWND hwnd, UINT wMsg, WPARAM wParam, LPARAM lParam)</div><div class="ttdef"><b>Definition:</b> <a href="a00356_source.html#l00471">ntcftxt.h:471</a></div></div>
<div class="ttc" id="aa00362_html_a3aa84979aeb1f89caa4217dc0f88b104"><div class="ttname"><a href="a00362.html#a3aa84979aeb1f89caa4217dc0f88b104">NtUserSetFocus</a></div><div class="ttdeci">HWND NtUserSetFocus(IN HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04594">kernel/ntstubs.c:4594</a></div></div>
<div class="ttc" id="aa00362_html_a97ea52174705d791899a9df860aab676"><div class="ttname"><a href="a00362.html#a97ea52174705d791899a9df860aab676">NtUserSetWindowPos</a></div><div class="ttdeci">BOOL NtUserSetWindowPos(IN HWND hwnd, IN HWND hwndInsertAfter, IN int x, IN int y, IN int cx, IN int cy, IN UINT dwFlags)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l01716">kernel/ntstubs.c:1716</a></div></div>
<div class="ttc" id="aa02581_html"><div class="ttname"><a href="a02581.html">tagWND</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01388">user.h:1388</a></div></div>
<div class="ttc" id="aa00335_html_ae4f4bae9800c2d6e50771827f515273e"><div class="ttname"><a href="a00335.html#ae4f4bae9800c2d6e50771827f515273e">SFI_ZAPACTIVEANDFOCUS</a></div><div class="ttdeci">#define SFI_ZAPACTIVEANDFOCUS</div><div class="ttdef"><b>Definition:</b> <a href="a00335_source.html#l00069">cscall.h:69</a></div></div>
<div class="ttc" id="aa00362_html_ab64eb963b74811908a5b9bc99d77b8ac"><div class="ttname"><a href="a00362.html#ab64eb963b74811908a5b9bc99d77b8ac">NtUserCallNoParam</a></div><div class="ttdeci">DWORD NtUserCallNoParam(IN DWORD xpfnProc)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l03204">kernel/ntstubs.c:3204</a></div></div>
<div class="ttc" id="aa00293_html_a41d387d1b2d42169cbaa2092c8a02abf"><div class="ttname"><a href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a></div><div class="ttdeci">#define ValidateHwnd(hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a00293_source.html#l00090">immcli.h:90</a></div></div>
<div class="ttc" id="aa00362_html_a98d8ab6298c0d956ef15fe0279a04b52"><div class="ttname"><a href="a00362.html#a98d8ab6298c0d956ef15fe0279a04b52">NtUserSetActiveWindow</a></div><div class="ttdeci">HWND NtUserSetActiveWindow(IN HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04493">kernel/ntstubs.c:4493</a></div></div>
<div class="ttc" id="aa03743_html_a8cf1d97d79126c678e058be653fa9296"><div class="ttname"><a href="a03743.html#a8cf1d97d79126c678e058be653fa9296">IsChild</a></div><div class="ttdeci">BOOL IsChild(HWND hwndParent, HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00622">client/wow.c:622</a></div></div>
<div class="ttc" id="aa00899_html_a70b09c3e2b495630f4205d34be505afb"><div class="ttname"><a href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a></div><div class="ttdeci">VOID CheckLock(PVOID pobj)</div></div>
<div class="ttc" id="aa02641_html_a8b2e13c78efca330f06b6ddcd7464b41"><div class="ttname"><a href="a02641.html#a8b2e13c78efca330f06b6ddcd7464b41">_DLG::result</a></div><div class="ttdeci">int result</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l02154">user.h:2154</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_caf01b281dbc7d7ffe410ecf117b6142.html">client</a></li><li class="navelem"><a class="el" href="a00098.html">dlgend.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
